modify it here.
1. modified the protocol used during the openvpn operation, from the original UDP protocol to the TCP protocol. We recommend that you use the TCP protocol to generate the environment.
2. modified the openvpn server certificate from server. csr and server. key to vpnilanni. crt and vpnilanni. key.
3. Changed the Diffie-Hellman file from dh1024.
country in which KEY_COUNTRY is defined.
The province in which KEY_PROVINCE is defined.
The city in which KEY_CITY is defined.
The organization in which the KEY_ORG definition is located.
KEY_EMAIL defines the email address.
The Unit in which KEY_OU is defined.
KEY_NAME defines the name of the openvpn server.
The above is all the content of The vars configuration file. We can also use the default configuration for the vars configuration file.
.
Details of the four servers used in this article:
Code:
IP address of the operating system server in IDC Vpn Mode
Vpn server RedHat 9.0 public network IP1 (China Netcom)
Public Network IP2 (China Telecom)
Guangzhou IDC Vpn client FreeBSD4.9 10.1.0.1
Hebei data center Vpn client RedHat9.0 10.2.0.1
Hangzhou data center Vpn client FreeBsd4.9 10.3.0.1
3.2 Network Security
In addition to the vpn server, vpn clients in other data centers do not need public IP addresses, so the vpn server n
step. press enter as prompted by default.
5. Generate The diffie hellman parameter to enhance openvpn security (the generation takes a long wait)
#./Build-dh
6. pack keys
# Tar zcvf keys.tar.gz keys/
7. send the terminal to the client for backup
# Yum install lrzsz-y
# Sz keys.tar.gz
5. configure openvpn server:
# Vi/etc/openvpn/server. conf
Note: the configur
/openvpn/easy-rsa]# CD ...
[root@ss-usa-odo01/etc/openvpn]# VI server.conf
# # #下面是我的配置文件可以参考
[root@ss-usa-odo01/etc/openvpn]# Grep-ev ' ^ ($|#) ' server.conf
; The local a.b.c.d #Specifies the local IP of the listener (because some computers have multiple IP addresses), the command is optional and all IP addresses are monitored by default.
Port 2
I. openvpn introduction openvpn is an SSL-based vpn. it uses the industrial standard SSL/TLS protocol to implement the Layer 2 and Layer 3 secure data link VPN. it has the following advantages: 1. based on the SSL protocol, security, and using a single TCP or UDP port can achieve 2. using two-way authentication...
I. INTRODUCTION to openvpnOpenvpn is an SSL-based
discuss VPN technology from the perspective of subordinates and regulators, and finally give a design. I may be an rebel.1. How about OpenVPN? This is the first choice for grass-roots DIY. However, it is not suitable for large enterprises with high traffic volumes.1.1.OpenVPN performance question 1.2.OpenVPN deployment question 2. the advantage of a completely s
uses two users, client1 and client2, as an example.[Root @ openvpn-server 2.0] #./build-key client1
[Root @ openvpn-server 2.0] #./build-key client2 # Same as above[Root @ openvpn-server 2.0] # ls-lsart keys
Modify the configuration file/etc/server. conf of the openvpn server[Root @
the-dev parameter cannot identify the device type.3) -- Dev-node: Any node is indicated as a virtual Nic device. The Node path and name can be arbitrary, but if it is not in the tunx/tapx format, the-Dev-type parameter must be configured.4) -- lladdr HW: configure the link layer address for the virtual Nic.2.1.2 network configuration parameters:1) -- local host: configure the IP address used locally. If it is not for bind, you do not need to configure this parameter.
file created in step 10th above from the server to this folder and rename it to Client.ovpnAlso, extract the following certificate files from the Mykeys.tar in step 8th into this folder:Code:Ca.crtCa.keyClient1.crtClient1.csrClient1.key Then double-click Client.ovpn to start the OpenVPN, or start the VPN through control of the OpenVPN GUI. If you double-click Client.ovpn No response, at the taskbar point
and Root key ca. key (Press enter all the way)./Build-ca# Generate a certificate and key for the server (Press enter all the way until y/n is prompted, enter y and press ENTER twice)./Build-key-server# Each VPN Client that logs on requires a certificate. Each certificate can be connected to only one client at a time. The following two certificates are created:# Generate a certificate and key for the client (Press enter all the way until y/n is prompted, enter y and press ENTER twice)./Build-key
mode to listen to the default UDP port 1194. The Virtual Interface uses the tun0 device. See the configuration example openvpn-2.0.9/sample-config-files/server. conf in the openvpn source code directory)
[Root @ gw1 ~] # Vim/etc/openvpn/gw1_tun0.conf
Local 173.74.75.76 // specify the IP address of the lis
listening port. The corresponding port 1194 must be enabled in the firewall # Set the TCP or UDP protocol? Proto tcp proto udp # Set the Route IP channel for creating tun or the Ethernet channel for creating tap # It is easy to control the Route IP, so we recommend using it; however, if IPX and so on must # use the second layer for communication, you can use the tap mode, that is, tap # Ethernet bridging;
firewall # Set the TCP or UDP protocol? Proto tcp proto udp # Set the Route IP channel for creating tun or the Ethernet channel for creating tap # It is easy to control the Route IP, so we recommend using it; however, if IPX and so on must # use the second layer for communication, you can use the tap mode, that is, tap # Ethernet bridging; dev tap dev tun # Windows needs to give the NIC a name, set here, n
: '2017 @ qq.com 'Certificate is to be certified until Dec 2 04:15:50 905407204 GMT (2022 days) Sign the certificate? [Y/n]: y 1 out of 1 certificate requests certified, commit? [Y/n] yWrite out database with 1 new entriesData Base Updated and so on to create other client keys #. /build-key client2 #. /build-key client3 note that when entering the Common Name (eg, your name or your server's hostname) []: input, each certificate must have a different Name. 5. generate the Diffie Hellman parameter
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.